import Vue from 'vue'
import VueRouter from 'vue-router'
// import login from './modules/login.js'
// import auth from '@/components/auth-redirect.vue'
// import Layout from '@/layout'
import constantRoutes from './constroutes'
Vue.use(VueRouter)

// const constantRoutes = [
//   // login,
//   {path:'/login',name:'login',component:()=>import('@/components/login/login.vue')},
//   {
//     path: '/',
//     component: Layout, 
//     // redirect:'/login',
//     // redirect: '/home', 
//     name: 'home',
//     // children:[{path:'/home',component:Home}]
//   },
//   {path:'/auth-redirect',component:auth}
// ]

const router = new VueRouter({
  mode: 'hash',
  // mode: 'history',
  base: process.env.BASE_URL,
  // routes
  routes: constantRoutes
})

export default router
